/*
* 2010
* Authors: Sergey Lapin <lapanoid@gmail.com>
* Numerator class
*/

#pragma once
#include <boost/unordered_map.hpp>
#include "fas_share.h"

using namespace std;

typedef boost::unordered_map<Vertex, Vertex_Number> Vertex2Int;
typedef boost::unordered_map<Vertex_Number, Vertex> Int2Vertex;

class FasDirnumerator
{
public:
    FasDirnumerator   (Graph *graph);

    void Numeration();

    Vertex_Number Map (Vertex in);
    void        Map (list<Vertex> &in, list<Vertex_Number> *res);

    Vertex2Int vertextable;    
private:
    Graph *worker;    
};

class FasInvnumerator
{    
public:
    FasInvnumerator   (Graph *graph);

    void Numeration();

    void   Map   (list<Vertex_Number> &in, list<Vertex> *res);
    Vertex Map   (const Vertex_Number in);

    Int2Vertex vertextable;    
private:
    Graph *worker;    
};
